package coop.tecso.test.objets.complex;

//src/gen
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 *
 */
@Entity
@Table(name = "COUPON_LOST")
public class CouponLost implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "COUPON_LOST_SEQ")
	@SequenceGenerator(name = "COUPON_LOST_SEQ", sequenceName = "COUPON_LOST_SEQ", allocationSize = 1)
	@Column(name = "COUPON_LOST_ID", nullable = false)
	private int id;
	@Version
	@Column(name = "VERSION")
	private int couponLostversion;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "COUPON", nullable = false, length = 1)
	private String coupon;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "CURRENCY", nullable = false, length = 3)
	private String currency;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "VALUE", nullable = false, length = 11, precision = 2)
	private java.math.BigDecimal value;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "DOCUMENT", nullable = false, precision = 10)
	private String document;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_USER", length = 255)
	private String tecCreationUser;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_TIMESTAMP")
	private java.sql.Timestamp tecCreationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_TIMESTAMP")
	private java.sql.Timestamp tecModificationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_USER", length = 255)
	private String tecModificationUser;

	/**
	 *
	 */
	@Column(name = "TEC_DELETED")
	private Boolean tecDeleted;

	/**
	 *
	 */
	@ManyToOne(targetEntity = LostDocument.class, optional = false, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "LOST_DOCUMENT_FK", referencedColumnName = "LOST_DOCUMENT_ID", nullable = false) })
	private LostDocument lostDocument;

	/**
	 *
	 */
	@ManyToOne(targetEntity = CouponUsed.class, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_USED_FK", referencedColumnName = "COUPON_USED_ID") })
	private CouponUsed couponUsed;

	public CouponLost() {
	}

	// Constructor for primary key
	public CouponLost(int id) {
		this.id = id;
	}

	/**
	 * Autogenerated key
	 */
	public int getId() {
		return id;
	}

	public int getCouponLostversion() {
		return couponLostversion;
	}

	public void setCouponLostversion(int couponLostversion) {
		this.couponLostversion = couponLostversion;
	}

	public String getCoupon() {
		return coupon;
	}

	public void setCoupon(String coupon) {
		this.coupon = coupon;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public java.math.BigDecimal getValue() {
		return value;
	}

	public void setValue(java.math.BigDecimal value) {
		this.value = value;
	}

	public String getDocument() {
		return document;
	}

	public void setDocument(String document) {
		this.document = document;
	}

	public String getTecCreationUser() {
		return tecCreationUser;
	}

	public void setTecCreationUser(String tecCreationUser) {
		this.tecCreationUser = tecCreationUser;
	}

	public java.sql.Timestamp getTecCreationTimestamp() {
		return tecCreationTimestamp;
	}

	public void setTecCreationTimestamp(java.sql.Timestamp tecCreationTimestamp) {
		this.tecCreationTimestamp = tecCreationTimestamp;
	}

	public java.sql.Timestamp getTecModificationTimestamp() {
		return tecModificationTimestamp;
	}

	public void setTecModificationTimestamp(java.sql.Timestamp tecModificationTimestamp) {
		this.tecModificationTimestamp = tecModificationTimestamp;
	}

	public String getTecModificationUser() {
		return tecModificationUser;
	}

	public void setTecModificationUser(String tecModificationUser) {
		this.tecModificationUser = tecModificationUser;
	}

	public Boolean getTecDeleted() {
		return tecDeleted;
	}

	public void setTecDeleted(Boolean tecDeleted) {
		this.tecDeleted = tecDeleted;
	}

	public LostDocument getLostDocument() {
		return lostDocument;
	}

	public void setLostDocument(LostDocument lostDocument) {
		this.lostDocument = lostDocument;
	}

	public CouponUsed getCouponUsed() {
		return couponUsed;
	}

	public void setCouponUsed(CouponUsed couponUsed) {
		this.couponUsed = couponUsed;
	}
}
